home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr46 / p061misc.zip / POP.BAT < prev    next >
DOS Batch File  |  1993-03-24  |  4KB  |  114 lines

  1. @ECHO OFF
  2. REM ╒═══════════════════════════════════════════════════════════════════════╕
  3. REM │                           SAMPLE POP.BAT                              │
  4. REM │                        Portal Of Power 0.60Γ                          │
  5. REM ├───────────────────────────────────────────────────────────────────────┤
  6. REM │     THIS EXAMPLE IS BASED ON PORTAL OF POWER, SQUISH AND MAXIMUS      │
  7. REM ╞═══════════════════════════════════════════════════════════════════════╡
  8. REM │ NOTE: To optimize the execution-speed of this batch-file, you can     │
  9. REM │ remove all REM lines. (But do keep a backup of the original file for  │
  10. REM │ future reference)                                                     │
  11. REM ╘═══════════════════════════════════════════════════════════════════════╛
  12.  
  13. :START
  14.   C:
  15.   CD \PORTAL
  16.   PORTAL %1 %2 %3 %4
  17.   REM ** The %1 %2 %3 %4 is used for transferring commandline options.
  18.   REM ** Eg. 'POP.BAT -n' would cause Portal to start with option -n
  19.  
  20. REM ┌───────────────────────────────────────────────────────────────────────┐
  21. REM │ ERRORLEVELs 251 to 255 are predefined for error-reporting             │
  22. REM └───────────────────────────────────────────────────────────────────────┘
  23.  
  24.   IF ERRORLEVEL 254 GOTO MEMERROR
  25.   IF ERRORLEVEL 253 GOTO MODEMERROR
  26.   IF ERRORLEVEL 252 GOTO OVRERROR
  27.   IF ERRORLEVEL 251 GOTO FOSSILERROR
  28.  
  29. REM ┌───────────────────────────────────────────────────────────────────────┐
  30. REM │ ERRORLEVELs 200 to 250 are suitable for userdefined errorlevels       │
  31. REM └───────────────────────────────────────────────────────────────────────┘
  32.  
  33.   IF ERRORLEVEL 230 GOTO POLLMYBOSS
  34.   IF ERRORLEVEL 220 GOTO UNPACK
  35.   IF ERRORLEVEL 210 GOTO PACK
  36.  
  37.  
  38. REM ┌───────────────────────────────────────────────────────────────────────┐
  39. REM │ ERRORLEVELs 3 to 192 will start the BBS with the correct baud-rate    │
  40. REM │ The errorlevel is equal to the Baud-Rate divided by 100               │
  41. REM └───────────────────────────────────────────────────────────────────────┘
  42.  
  43.   IF ERRORLEVEL 192 GOTO BBS
  44.   IF ERRORLEVEL 168 GOTO BBS
  45.   IF ERRORLEVEL 144 GOTO BBS
  46.   IF ERRORLEVEL 120 GOTO BBS
  47.   IF ERRORLEVEL 96 GOTO BBS
  48.   IF ERRORLEVEL 72 GOTO BBS
  49.   IF ERRORLEVEL 48 GOTO BBS
  50.   IF ERRORLEVEL 24 GOTO BBS
  51.   IF ERRORLEVEL 12 GOTO BBS
  52.   IF ERRORLEVEL 3 GOTO BBS
  53.  
  54.   IF ERRORLEVEL 0 GOTO END
  55.   REM ** This is equal to 'GOTO END'
  56.  
  57. REM ┌───────────────────────────────────────────────────────────────────────┐
  58. REM │ Here follows the routine for starting the BBS                         │
  59. REM └───────────────────────────────────────────────────────────────────────┘
  60.  
  61. :BBS
  62.   BBSBATCH
  63.   REM ** Please note that by keeping the BBS-batch as the first, the exe-
  64.   REM ** cutions speed of this batchfile is enhanced.
  65.   REM ** The BBSBATCH.BAT File Is Written By Portal, And Are Connected To
  66.   REM ** SPAWNBBS.BAT
  67.   REM ** Your SPAWNBBS.BAT File MUST Start This BatchFile When Finished.
  68.   REM ** Therefore There Is No Need For The 'GOTO START' Here.
  69.   REM ** Refer To Enclosed SPAWNBBS.BAT For An Example.
  70.  
  71. REM ┌───────────────────────────────────────────────────────────────────────┐
  72. REM │ Here You Place Your Userdefined Routines (For system-maintenance)     │
  73. REM │ The Examples Are Based On SQUISH                                      │
  74. REM └───────────────────────────────────────────────────────────────────────┘
  75.  
  76. :PACK
  77.   SQUISH OUT SQUASH
  78. GOTO START
  79.  
  80. :UNPACK
  81.   SQUISH IN OUT SQUASH
  82. GOTO START
  83.  
  84. :POLLMYBOSS
  85.   SQUISH OUT SQUASH -sPOLLMYBOSS
  86. GOTO START
  87.  
  88. REM ┌───────────────────────────────────────────────────────────────────────┐
  89. REM │ Here the Errormessages follows:                                       │
  90. REM └───────────────────────────────────────────────────────────────────────┘
  91.  
  92. :MEMERROR
  93.   ECHO Memory Allocation Error - Please Check Your System.
  94. GOTO END
  95.  
  96. :MODEMERROR
  97.   ECHO Error Initializing Modem - Please Check Your Modem, Cabling
  98.   ECHO And Your Portal Port And Speed Configuration.
  99. GOTO END
  100.  
  101. :OVRERROR
  102.   ECHO Error Initializing Overlay Manager - Please Check You System
  103. GOTO END
  104.  
  105. :FOSSILERROR
  106.   ECHO No Fossil Loaded - Please Check Your System.
  107. GOTO END
  108.  
  109. REM ┌───────────────────────────────────────────────────────────────────────┐
  110. REM │ This is the end of this batch-file, DO NOT REMOVE THIS LABEL          │
  111. REM └───────────────────────────────────────────────────────────────────────┘
  112.  
  113. :END
  114.